package com.g7.figmaapi.common.exception.business;


import com.g7.figmaapi.common.exception.Errors;

/**
 * @author: taoxiangqian
 * @explain:
 * @since: 2023/10/26 11:00
 */
public class ValidationException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private String code;
    private String msg;
    private String exception;
    private Object object;

    public ValidationException() {
    }

    public ValidationException(Throwable cause) {
        super(cause);
    }

    public ValidationException(String code) {
        this.code = code;
    }

    public ValidationException(String code, String exception, String msg) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
    }

    public ValidationException(String code, String exception, String msg, Object object) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
        this.object = object;
    }

    public ValidationException(Errors errors) {
        super(errors.msg);
        this.code = errors.code;
        this.exception = errors.exception;
        this.msg = errors.msg;
    }

    public ValidationException(Errors errors, Object object) {
        super(errors.msg);
        this.code = errors.code;
        this.exception = errors.exception;
        this.msg = errors.msg;
        this.object = object;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }
}
